package com.hongpu.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hongpu.domain.HpProjectWorkPay;
import com.hongpu.vo.HpProjectWorkPayVo;

import java.math.BigDecimal;
import java.util.List;

/**
* @author Michael zhang
* @description 针对表【hp_project_work_pay(项目的回款与支出)】的数据库操作Service
* @createDate 2025-04-25 21:03:15
*/
public interface HpProjectWorkPayService extends IService<HpProjectWorkPay> {

    public boolean add(HpProjectWorkPay hpProjectWorkPay);


    /**
     * 分页
     */
    public IPage<HpProjectWorkPayVo> selectPage(IPage<?> page,String projectName);

    public List<HpProjectWorkPayVo> selectList(String projectName);

    /**
     * 根据项目ID和收入或支出标识删除存在的数据
     */
    public HpProjectWorkPay getHpProjectWorkPay(Long projectId,String incomeAndExpenditureTypes);

    /**
     * 根据项目ID删除主数据
     */
    public boolean deleteByProjectId(Long projectId);

    public boolean deleteById(Long id);

    /**
     * 当项目管理模块新增一个项目时，需要同时新增一条收款和支付记录
     * @param projectId
     * @param project_name
     * @param projectAmount  项目金额或合同总额，仅用于收款时使用
     * @return
     */
    public boolean addProjectWorkPay(Long projectId, String projectName, BigDecimal projectAmount);

    /**
     * 根据项目ID修改项目名称
     */
    public boolean updateProjectName(Long projectId,String projectName,BigDecimal projectAmount);
}
